// 时间设置
var oTime = document.getElementById('time');
// 动态时间函数
var timer = setInterval(function(){
    var d = new Date();
    oTime.innerHTML = d.getFullYear() + "年" + (d.getMonth() + 1) + "月" + d.getDate() + "日  " + toDouble(d.getHours()) + ":" + toDouble(d.getMinutes()) + ":" + toDouble(d.getSeconds());
        }, 1000)

//  补0
function toDouble(n){
    return n < 10 ? '0' + n : n;
}


